package com.micro.turtle.model.resp;

import cn.hutool.core.annotation.Alias;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Description: TODO
 * Created by: jason.lv
 * Creation time: 2022/1/21 15:46
 * Modification description:
 * Modified by:
 * Modification time:
 * Version: V1.0
 *
 * @author jason.lv
 * @since 2022/1/21 15:46
 */
@NoArgsConstructor
@Data
public class JobResp {


    @Alias("commit")
    private CommitDTO commit;
    @Alias("coverage")
    private Object coverage;
    @Alias("allow_failure")
    private Boolean allowFailure;
    @Alias("created_at")
    private String createdAt;
    @Alias("started_at")
    private Object startedAt;
    @Alias("finished_at")
    private Object finishedAt;
    @Alias("duration")
    private Object duration;
    @Alias("queued_duration")
    private Double queuedDuration;
    @Alias("id")
    private Integer id;
    @Alias("name")
    private String name;
    @Alias("ref")
    private String ref;
    @Alias("artifacts")
    private List<?> artifacts;
    @Alias("runner")
    private Object runner;
    @Alias("stage")
    private String stage;
    @Alias("status")
    private String status;
    @Alias("tag")
    private Boolean tag;
    @Alias("web_url")
    private String webUrl;
    @Alias("user")
    private Object user;

    @NoArgsConstructor
    @Data
    public static class CommitDTO {

        @Alias("author_email")
        private String authorEmail;
        @Alias("author_name")
        private String authorName;
        @Alias("created_at")
        private String createdAt;
        @Alias("id")
        private String id;
        @Alias("message")
        private String message;
        @Alias("short_id")
        private String shortId;
        @Alias("title")
        private String title;
    }
}
